home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / science / sm32a.zip / LIBRARY / GCD.LI < prev    next >
Text File  |  1993-10-16  |  141b  |  5 lines

  1. #    gcd(a,b) gives the greatest common dividor of a and b
  2. #    e.g. gcd(9,6) gives 3
  3.  
  4. gcd(a_, b_) := if(mod(a,b) == 0, b, gcd(b, mod(a,b)) )
  5.